-- ----------------------------
-- Table structure for __PREFIX__xilujob_area
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_area` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `pid` int(10) DEFAULT NULL COMMENT '父id',
  `shortname` varchar(100) DEFAULT NULL COMMENT '简称',
  `name` varchar(100) DEFAULT NULL COMMENT '名称',
  `mergename` varchar(255) DEFAULT NULL COMMENT '全称',
  `level` tinyint(4) DEFAULT NULL COMMENT '层级 0 1 2 省市区县',
  `pinyin` varchar(100) DEFAULT NULL COMMENT '拼音',
  `code` varchar(100) DEFAULT NULL COMMENT '长途区号',
  `zip` varchar(100) DEFAULT NULL COMMENT '邮编',
  `first` varchar(50) DEFAULT NULL COMMENT '首字母',
  `lng` varchar(100) DEFAULT NULL COMMENT '经度',
  `lat` varchar(100) DEFAULT NULL COMMENT '纬度',
  `is_jie` tinyint(1) unsigned DEFAULT '0' COMMENT '是否开放街道:0=否,1=是',
  `is_re` tinyint(1) unsigned DEFAULT '0' COMMENT '是否热门:0=否,1=是',
  `status` tinyint(1) DEFAULT '1',
  `creator` int(11) unsigned DEFAULT '0',
  `update_time` datetime DEFAULT NULL,
  `allname` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
  `price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '价格',
  `weigh` int(10) DEFAULT '0',
  `pay_type` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `pid` (`pid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='地区表';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_chat
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_chat` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `from_uid` int(10) NOT NULL DEFAULT '0' COMMENT '发信息人ID',
  `to_uid` int(10) NOT NULL DEFAULT '0' COMMENT '收信息人ID',
  `from_info` longtext COLLATE utf8mb4_general_ci COMMENT '发送人信息',
  `message` longtext COLLATE utf8mb4_general_ci COMMENT '消息数据',
  `type` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '消息类型',
  `job_id` int(10) NOT NULL DEFAULT '0' COMMENT '职位id',
  `online` tinyint(1) NOT NULL DEFAULT '0' COMMENT '在线状态:0=离线消息,1=在线消息',
  `isread` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否已读:0=未读,1=已读',
  `isclosed` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否关闭:0=否,1=是',
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='聊天记录表';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_sentence
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_sentence` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) NOT NULL DEFAULT '',
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '创建的用户，后台创建为0',
  `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '排序',
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='常用语';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_banner
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_banner` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `city_id` int(10) NOT NULL DEFAULT '0' COMMENT '城市id',
  `url` varchar(255) NOT NULL DEFAULT '' COMMENT '指向链接',
  `minapp_url` varchar(255) NOT NULL DEFAULT '' COMMENT '小程序链接',
  `image` varchar(255) NOT NULL COMMENT '图片',
  `group` varchar(50) NOT NULL DEFAULT '' COMMENT '分组',
  `show_count` int(11) NOT NULL DEFAULT '0',
  `view_count` int(11) NOT NULL DEFAULT '0',
  `status` enum('0','1') NOT NULL DEFAULT '0' COMMENT '状态:0=隐藏,1=显示',
  `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '排序',
  `memo` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
  `createtime` bigint(16) DEFAULT NULL,
  `updatetime` bigint(16) DEFAULT NULL,
  `deletetime` bigint(16) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='图片banner';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_benefit
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_benefit` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) NOT NULL,
  `company_id` int(10) NOT NULL DEFAULT '0' COMMENT '创建的企业，后台创建为0',
  `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '排序',
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='企业福利';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_black_words
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_black_words` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `keyword` char(10) NOT NULL DEFAULT '' COMMENT '关键字',
  `regex` varchar(255) NOT NULL DEFAULT '' COMMENT '正则查找表达式,若留空则自动在中文字符左右两边加上各类隔断字符',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `keyword` (`keyword`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='敏感词管理';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_comment_tag
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_comment_tag` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) NOT NULL DEFAULT '' COMMENT '名称',
  `weigh` int(10) NOT NULL DEFAULT '0',
  `createtime` bigint(16) unsigned DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `name` (`name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='评论标签';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_company_comment
-- ----------------------------

CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_company_comment` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '用户',
  `company_id` int(10) NOT NULL DEFAULT '0' COMMENT '公司',
  `environment_score` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '办公环境评分',
  `benefit_score` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '福利待遇评分',
  `opportunity_score` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '晋升空间评分',
  `avg_score` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '平均评分',
  `content` varchar(255) NOT NULL DEFAULT '' COMMENT '评价内容',
  `tags` varchar(500) NOT NULL DEFAULT '',
  `status` tinyint(4) NOT NULL DEFAULT '0',
  `createtime` bigint(16) unsigned DEFAULT NULL COMMENT '发布时间',
  `updatetime` bigint(16) unsigned DEFAULT NULL,
  `deletetime` bigint(16) unsigned DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `company_id` (`company_id`,`user_id`) USING BTREE,
  KEY `deletetime` (`deletetime`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='企业评价';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_company_profile
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_company_profile` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `avg_score` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '平均评分',
  `personal_audit_status` tinyint(3) NOT NULL DEFAULT '0' COMMENT '状态:0-未审核,1=已审核,2=待审核,3=未通过',
  `audit_status` tinyint(3) NOT NULL DEFAULT '0' COMMENT '状态:0-未审核,1=已审核,2=待审核,3=未通过',
  `top` int(11) NOT NULL DEFAULT '0' COMMENT '置顶排序， 大于0为置顶',
  `miniapp_code` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
  `createtime` bigint(16) unsigned DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) unsigned DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) unsigned DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `deletetime` (`deletetime`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='企业店铺基本信息';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_company_properties
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_company_properties` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) NOT NULL COMMENT '名称',
  `weigh` int(10) NOT NULL DEFAULT '0',
  `visible_switch` enum('0','1') NOT NULL DEFAULT '1' COMMENT '状态:0=禁用,1=启用',
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='企业性质';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_company_recommend_resume
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_company_recommend_resume` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `company_id` int(10) NOT NULL DEFAULT '0' COMMENT '企业',
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '用户',
  `resume_id` int(10) NOT NULL DEFAULT '0' COMMENT '简历',
  `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '排序',
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `company_id` (`company_id`,`user_id`,`resume_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='为公司人工推荐简历';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_company_scale
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_company_scale` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '名称',
  `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '排序',
  `visible_switch` enum('0','1') COLLATE utf8mb4_bin NOT NULL DEFAULT '1' COMMENT '状态:0=禁用,1=启用',
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='公司规模';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_company_statistics
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_company_statistics` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `company_id` int(10) NOT NULL DEFAULT '0' COMMENT '公司id',
  `view_count` int(10) unsigned NOT NULL DEFAULT '0',
  `job_count` int(11) NOT NULL DEFAULT '0' COMMENT '招聘职位数量, status=1的, 上架、下架、发布都需要修改此字段',
  `labour_job_count` int(11) NOT NULL DEFAULT '0' COMMENT '店铺服务岗位数， 由labour_job_relation决定， 且job.status==1',
  `job_view_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '浏览人数',
  `job_apply_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '投递数量',
  `job_signup_count` int(11) NOT NULL DEFAULT '0' COMMENT '职位报名人数',
  `resume_download_count` int(10) NOT NULL DEFAULT '0' COMMENT '简历下载数',
  `interview_invite_count` int(10) NOT NULL DEFAULT '0' COMMENT '面试邀请数',
  `job_refresh_count` int(10) NOT NULL DEFAULT '0' COMMENT '刷新数',
  `job_call_count` int(10) NOT NULL DEFAULT '0' COMMENT '拨打电话数',
  `apply_view_count` int(11) NOT NULL DEFAULT '0' COMMENT '投递查阅数量; 第一次查阅 待查阅 的投递时',
  `apply_handle_count` int(11) NOT NULL DEFAULT '0' COMMENT '处理投递数量; 从待查阅变成任意状态时+1',
  `interview_comment_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '面试评价数',
  `apply_view_rate` tinyint(3) NOT NULL DEFAULT '0' COMMENT '投递查看率=查阅数/投递数',
  `apply_handle_rate` tinyint(3) NOT NULL DEFAULT '0' COMMENT '投递反馈率',
  `apply_invite_count` int(10) NOT NULL DEFAULT '0' COMMENT '投递简历邀请次数',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for __PREFIX__xilujob_company_view_log
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_company_view_log` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
  `company_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'company_profile.id',
  `view_count` int(10) unsigned NOT NULL DEFAULT '1' COMMENT '看的总次数',
  `view_time` bigint(16) unsigned DEFAULT NULL COMMENT '上一次看的时间',
  `createtime` bigint(16) unsigned DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户浏览企业';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_education_level
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_education_level` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(10) NOT NULL DEFAULT '' COMMENT '名称',
  `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '排序, 按受教育层次',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for __PREFIX__xilujob_enterprise_benefit
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_enterprise_benefit` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `enterprise_id` int(10) NOT NULL,
  `benefit_id` int(10) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `enterprise_id` (`enterprise_id`,`benefit_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for __PREFIX__xilujob_enterprise_info
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_enterprise_info` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `company_id` int(10) NOT NULL DEFAULT '0' COMMENT '公司id',
  `full_name` varchar(50) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '企业全称(非执照名)',
  `industry_category_id` int(10) NOT NULL DEFAULT '0' COMMENT '所属行业',
  `contact_person` varchar(20) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '联系人全名',
  `contact_phone` varchar(20) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '联系电话',
  `contact_email` varchar(40) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
  `logo` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '企业logo',
  `address` varchar(50) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '公司地址',
  `company_scale_id` int(10) NOT NULL DEFAULT '0',
  `company_type_id` int(10) NOT NULL DEFAULT '0',
  `intro` varchar(500) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '公司简介',
  `environment_images` mediumtext COLLATE utf8mb4_bin COMMENT '公司环境图片',
  `license_img` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '营业执照图片(企业实名认证)',
  `company_name` varchar(50) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '公司全称(企业实名认证)',
  `license_no` varchar(50) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '营业执照编码(企业实名认证)',
  `valid_date` varchar(20) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '有效日期(企业实名认证)',
  `personal_realname` varchar(20) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '个人实名(个人实名认证)',
  `personal_identity_no` varchar(20) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '个人身份证号(个人实名认证)',
  `info_complete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '资料完成百分比',
  `resume_share_img` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '简历分享码',
  `share_img` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '分享码',
  `share_poster_img` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `city_id` int(10) NOT NULL DEFAULT '0' COMMENT '城市id',
  `district_id` int(10) NOT NULL DEFAULT '0' COMMENT '地区id',
  `lng` float(10,7) NOT NULL DEFAULT '0.0000000' COMMENT '经度',
  `lat` float(10,7) NOT NULL DEFAULT '0.0000000' COMMENT '纬度',
  `geohash` char(8) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
  `geo_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'geo地址更新状态: 0=等待解析更新, 1=已更新, 2=地址解析失败,放弃更新',
  `avg_score` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '平均分',
  `daily_resume_action_num` int(10) unsigned NOT NULL DEFAULT '10' COMMENT '人才主动操作每日免费次数',
  `resume_action_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '人才主动操作剩余次数',
  `job_num_limit` int(10) unsigned NOT NULL DEFAULT '30' COMMENT '职位总数限制',
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `deleted_at` (`deletetime`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='企业身份';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_feedback_type
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_feedback_type` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '名称',
  `status` enum('1','0') NOT NULL DEFAULT '1' COMMENT '状态:0=禁用,1=启用',
  `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '排序',
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='意见反馈类型';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_industry_category
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_industry_category` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `weigh` int(10) NOT NULL DEFAULT '0',
  `createtime` bigint(16) unsigned DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) unsigned DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) unsigned DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='行业';


-- ----------------------------
-- Table structure for __PREFIX__xilujob_inform
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_inform` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '用户',
  `job_id` int(10) NOT NULL DEFAULT '0' COMMENT '职位',
  `job_inform_type_id` int(10) unsigned NOT NULL COMMENT '举报类型',
  `content` varchar(500) NOT NULL COMMENT '举报原因',
  `images` mediumtext COMMENT '图片',
  `contact` varchar(40) NOT NULL DEFAULT '' COMMENT '联系方式',
  `createtime` bigint(16) unsigned DEFAULT NULL COMMENT '举报时间',
  `deal_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '处理状态:0=待处理,1=已处理',
  `deal_remarks` varchar(255) NOT NULL DEFAULT '' COMMENT '处理备注',
  `deal_time` bigint(16) unsigned DEFAULT NULL COMMENT '处理时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for __PREFIX__xilujob_inform_type
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_inform_type` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(40) NOT NULL DEFAULT '' COMMENT '名称',
  `weigh` int(10) NOT NULL,
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='职位举报类型';


-- ----------------------------
-- Table structure for __PREFIX__xilujob_interview_comment
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_interview_comment` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '评论的用户',
  `job_id` int(10) NOT NULL DEFAULT '0' COMMENT '职位id',
  `company_id` int(10) NOT NULL DEFAULT '0' COMMENT '公司id',
  `interview_id` int(10) NOT NULL DEFAULT '0' COMMENT '邀请面试id',
  `environment_score` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '办公环境分数 1-5',
  `benefit_score` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '福利分数',
  `opportunity_score` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '晋升空间分数',
  `avg_score` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '平均分',
  `tags` varchar(255) NOT NULL DEFAULT '' COMMENT ',分隔',
  `content` varchar(255) NOT NULL DEFAULT '' COMMENT '评论详细内容',
  `anonymous` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否匿名 0,1',
  `status` tinyint(4) NOT NULL DEFAULT '1',
  `createtime` bigint(16) unsigned DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) unsigned DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) unsigned DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for __PREFIX__xilujob_job
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_job` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `publisher_id` int(10) NOT NULL DEFAULT '0' COMMENT '发布者id',
  `publisher_type` tinyint(4) NOT NULL DEFAULT '2' COMMENT '用户类型:2=企业,3=劳务店铺; 同user.group_id',
  `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '类型:1=全职,2=兼职',
  `job_name` char(20) NOT NULL DEFAULT '' COMMENT '职位名称',
  `job_category_id` int(10) NOT NULL DEFAULT '0' COMMENT '职位分类',
  `province_id` int(10) NOT NULL DEFAULT '0' COMMENT '省份id',
  `city_id` int(10) NOT NULL DEFAULT '0' COMMENT '城市id',
  `district_id` int(10) NOT NULL DEFAULT '0' COMMENT '区id',
  `town_id` int(10) NOT NULL DEFAULT '0' COMMENT '镇 id',
  `brand` tinyint(4) NOT NULL DEFAULT '0' COMMENT '名企大厂 0=否 1=是',
  `in_hurry` tinyint(4) NOT NULL DEFAULT '0' COMMENT '急聘',
  `direct` tinyint(4) NOT NULL DEFAULT '0' COMMENT '直招',
  `shop` tinyint(4) NOT NULL DEFAULT '0' COMMENT '店铺招聘',
  `red_packet` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '红包招聘,金额元',
  `red_packet_instruction` varchar(200) NOT NULL DEFAULT '',
  `work_experience_id` int(10) NOT NULL DEFAULT '0' COMMENT '工作年限',
  `education_level_id` int(10) NOT NULL DEFAULT '0' COMMENT '学历',
  `salary_type` tinyint(3) NOT NULL DEFAULT '0' COMMENT '薪资类型: 0=面议, 1=时薪,2=日薪,3=月薪',
  `salary_min` int(11) NOT NULL DEFAULT '0' COMMENT '最低薪资',
  `salary_max` int(11) NOT NULL DEFAULT '0' COMMENT '最高薪资',
  `num` int(10) NOT NULL DEFAULT '1' COMMENT '招聘人数',
  `refreshtime` bigint(16) DEFAULT NULL COMMENT '刷新时间',
  `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0=下架,1=上架, 2=待审核, 3=未过审',
  `black` tinyint(4) NOT NULL DEFAULT '0' COMMENT '屏蔽:0=正常,1=屏蔽',
  `refresh_date` date DEFAULT NULL COMMENT '刷新日期',
  `top` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '置顶, desc',
  `view_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '查阅次数',
  `fav_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '收藏数',
  `apply_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '申请次数',
  `publish_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '发布次数',
  `publish_time` bigint(16) DEFAULT NULL COMMENT '最新发布时间',
  `signup_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '报名次数',
  `avg_score` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '评均分',
  `miniapp_code` varchar(255) NOT NULL DEFAULT '' COMMENT '小程序二维码',
  `createtime` bigint(16) unsigned DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) unsigned DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) unsigned DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `publisher_id` (`publisher_id`) USING BTREE,
  KEY `type` (`type`) USING BTREE,
  KEY `city_district` (`city_id`,`district_id`) USING BTREE,
  KEY `work_experience_id` (`work_experience_id`) USING BTREE,
  KEY `education_level_id` (`education_level_id`,`salary_type`) USING BTREE,
  KEY `top` (`top`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='招聘职位';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_job_apply
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_job_apply` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL COMMENT '申请人',
  `resume_id` int(10) NOT NULL,
  `company_id` int(10) NOT NULL COMMENT '职位发布公司',
  `job_id` int(10) NOT NULL COMMENT '职位id',
  `status` tinyint(4) NOT NULL COMMENT '0=已投递,1=不合适(拒绝投递， 完结),2=面试邀请(等待用户回应),3=拒绝面试邀请(完结),4=同意面试邀请,5=面试失败(完结),6=面试成功(完结)',
  `interview_id` int(10) NOT NULL DEFAULT '0' COMMENT 'job_interview.id 如果没有发起面试邀请，为0',
  `accepttime` bigint(16) DEFAULT NULL COMMENT '接受投递时间（发起面试邀请）',
  `rejecttime` bigint(16) DEFAULT NULL COMMENT '拒绝投递时间',
  `createtime` bigint(16) DEFAULT NULL COMMENT '投递时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `user_id` (`user_id`,`job_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='简历投递状态';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_job_benefit_relation
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_job_benefit_relation` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `job_id` int(10) NOT NULL DEFAULT '0' COMMENT '职位id',
  `benefit_id` int(10) NOT NULL DEFAULT '0' COMMENT '福利id',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `company_benefit` (`job_id`,`benefit_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='企业福利关联表';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_job_call
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_job_call` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL,
  `job_id` int(10) NOT NULL,
  `company_id` int(10) NOT NULL,
  `createtime` bigint(16) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for __PREFIX__xilujob_job_category
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_job_category` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `pid` int(10) unsigned NOT NULL DEFAULT '0',
  `category_name` varchar(80) NOT NULL COMMENT '名称',
  `weigh` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  `path` varchar(80) NOT NULL DEFAULT '',
  `name_path` varchar(255) NOT NULL DEFAULT '' COMMENT '分类名path',
  `labour_job` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否蓝领职位:0=否,1=是',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `parentid` (`pid`) USING BTREE,
  KEY `path` (`path`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='职能';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_job_info
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_job_info` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `job_id` int(10) NOT NULL DEFAULT '0' COMMENT '职位id',
  `responsibility` varchar(600) NOT NULL DEFAULT '' COMMENT '工作描述详情',
  `requirement` varchar(600) NOT NULL DEFAULT '' COMMENT '任职要求',
  `environment_images` mediumtext COMMENT '工作环境图片',
  `contact_person` varchar(20) NOT NULL DEFAULT '' COMMENT '联系人',
  `contact_phone` varchar(20) NOT NULL DEFAULT '' COMMENT '联系人手机',
  `contact_email` varchar(40) NOT NULL DEFAULT '' COMMENT '联系人邮箱',
  `failed_reason` varchar(100) NOT NULL DEFAULT '',
  `audittime` bigint(16) unsigned DEFAULT NULL COMMENT '审核时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='职位更多属性';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_job_interview
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_job_interview` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '申请人',
  `resume_id` int(10) NOT NULL DEFAULT '0' COMMENT '简历id',
  `company_id` int(10) NOT NULL DEFAULT '0' COMMENT '职位发布公司',
  `job_id` int(10) NOT NULL DEFAULT '0' COMMENT '职位id',
  `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '面试状态:0=面试邀请(等待用户回应),1=用户拒绝面试邀请(完结),2=用户同意面试邀请,3=面试失败(完结),4=面试成功(完结)',
  `interview_time` bigint(16) DEFAULT NULL COMMENT '面试时间',
  `address` varchar(50) NOT NULL DEFAULT '' COMMENT '面试地址',
  `contact` varchar(20) NOT NULL DEFAULT '' COMMENT '联系人',
  `contact_phone` varchar(20) NOT NULL DEFAULT '' COMMENT '联系电话',
  `contact_email` varchar(50) NOT NULL DEFAULT '' COMMENT '联系邮箱',
  `notice` varchar(255) NOT NULL DEFAULT '' COMMENT '注意事项: ,分隔',
  `send_message` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否发信息 0 ,1 ',
  `send_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '消息发送状态 0,1',
  `accepttime` bigint(16) DEFAULT NULL COMMENT '用户同意面试邀请时间',
  `rejecttime` bigint(16) DEFAULT NULL COMMENT '用户拒绝面试邀请时间',
  `passtime` bigint(16) DEFAULT NULL COMMENT '面试成功的时间',
  `failtime` bigint(16) DEFAULT NULL COMMENT '面试成功的时间',
  `has_comment` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否已经评论过  0,1',
  `createtime` bigint(16) DEFAULT NULL COMMENT '邀请时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `user_id` (`user_id`,`job_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='面试记录';


-- ----------------------------
-- Table structure for __PREFIX__xilujob_job_location
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_job_location` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `job_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '职位ID',
  `province_id` int(10) NOT NULL DEFAULT '0' COMMENT '省id',
  `city_id` int(10) NOT NULL DEFAULT '0' COMMENT '市id',
  `district_id` int(10) NOT NULL DEFAULT '0' COMMENT '区id',
  `address` varchar(40) NOT NULL DEFAULT '' COMMENT '详细地址',
  `lng` float(10,7) NOT NULL DEFAULT '0.0000000' COMMENT '经度',
  `lat` float(10,7) NOT NULL DEFAULT '0.0000000' COMMENT '纬度',
  `geohash` char(8) NOT NULL DEFAULT '',
  `geo_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'geo地址更新状态: 0=等待解析更新, 1=已更新, 2=地址解析失败,放弃更新',
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='职位的工作地点';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_job_view_log
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_job_view_log` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
  `job_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '职位id',
  `view_count` int(10) unsigned NOT NULL DEFAULT '1' COMMENT '看的总次数',
  `view_time` bigint(16) unsigned DEFAULT NULL COMMENT '上一次看的时间',
  `createtime` bigint(16) unsigned DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户查看职位日志';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_link
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_link` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '类型:1=蓝领招聘,2=兼职招聘,3=红包招聘',
  `name` varchar(20) NOT NULL DEFAULT '' COMMENT '名称',
  `url` varchar(500) NOT NULL DEFAULT '' COMMENT '链接',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='首页招聘专区链接';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_member
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_member` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
  `job_signup_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '职位报名数',
  `job_apply_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '申请职位数',
  `job_view_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '查看职位数',
  `interview_invite_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '被邀请数',
  `createtime` bigint(16) unsigned DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `deletetime` (`deletetime`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for __PREFIX__xilujob_newbie_help
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_newbie_help` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `title` varchar(50) NOT NULL,
  `content` mediumtext NOT NULL,
  `status` enum('0','1') NOT NULL DEFAULT '0' COMMENT '状态:0=隐藏,1=显示',
  `weigh` tinyint(3) NOT NULL DEFAULT '0',
  `createtime` bigint(16) DEFAULT NULL COMMENT '添加时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for __PREFIX__xilujob_news
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_news` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `title` varchar(50) DEFAULT NULL COMMENT '标题',
  `news_category_id` int(10) NOT NULL DEFAULT '0' COMMENT '分类id',
  `content` mediumtext COMMENT '详情',
  `status` tinyint(4) DEFAULT '1' COMMENT '状态:0=禁用,1=启用',
  `view_count` int(11) NOT NULL DEFAULT '0' COMMENT '浏览量',
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) DEFAULT NULL COMMENT '删除时间',
  `thumb` varchar(100) DEFAULT NULL COMMENT '缩略图',
  `is_recommend` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否推荐，0-否，1-是',
  `top` int(11) DEFAULT '0',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文章管理';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_news_category
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_news_category` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(10) DEFAULT NULL COMMENT '分类名称',
  `weigh` int(10) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for __PREFIX__xilujob_personal_message
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_personal_message` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `user_group_id` tinyint(4) NOT NULL,
  `company_id` int(10) NOT NULL DEFAULT '0' COMMENT '公司id',
  `title` varchar(30) NOT NULL DEFAULT '' COMMENT '名称',
  `content` varchar(255) NOT NULL DEFAULT '' COMMENT '内容',
  `type` tinyint(3) NOT NULL DEFAULT '0' COMMENT '类型: 多样，见php class',
  `read` tinyint(1) NOT NULL DEFAULT '0' COMMENT '读取状态:0=未读,1=已读',
  `extra` varchar(500) NOT NULL DEFAULT '',
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='简历消息; 非简历模块数据';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_resume
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_resume` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '用户id;user.id',
  `schema_id` int(10) NOT NULL DEFAULT '0' COMMENT '模板id',
  `complete_percent` int(3) NOT NULL DEFAULT '0' COMMENT '简历完整度 0-100',
  `view_count` int(10) NOT NULL DEFAULT '0' COMMENT '查阅次数',
  `download_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '下载次数',
  `fav_count` int(10) NOT NULL DEFAULT '0' COMMENT '收藏次数',
  `refreshetime` timestamp NULL DEFAULT NULL COMMENT '刷新时间',
  `refresh_date` date DEFAULT NULL COMMENT '刷新日期',
  `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:0=隐藏,1=显示',
  `hide_education` tinyint(4) NOT NULL DEFAULT '0' COMMENT '隐藏教育经历',
  `jpg_path` varchar(255) NOT NULL DEFAULT '' COMMENT '简历jpg图片的路径， 文件名以 md5(id+''_''+updated_at)命名， 以判断是否要更新图片',
  `black` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0=正常,1=屏蔽',
  `top` int(11) NOT NULL DEFAULT '0' COMMENT '置顶  desc',
  `miniapp_code` varchar(255) NOT NULL DEFAULT '',
  `createtime` bigint(16) unsigned DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) unsigned DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) unsigned DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户简历';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_resume_action_log
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_resume_action_log` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `company_id` int(10) NOT NULL,
  `user_id` int(10) NOT NULL,
  `resume_id` int(10) NOT NULL,
  `createtime` bigint(16) unsigned NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `company_id` (`company_id`,`user_id`,`resume_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for __PREFIX__xilujob_resume_download
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_resume_download` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `company_id` int(10) NOT NULL,
  `user_id` int(10) NOT NULL,
  `resume_id` int(10) NOT NULL,
  `createtime` bigint(16) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `company_id` (`company_id`,`resume_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='企业查看、收藏简历';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_resume_education
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_resume_education` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `resume_id` int(10) NOT NULL DEFAULT '0' COMMENT '简历id',
  `school_name` varchar(20) NOT NULL DEFAULT '' COMMENT '学校名称',
  `education_level_id` int(10) NOT NULL DEFAULT '0' COMMENT '学历',
  `major` varchar(20) NOT NULL DEFAULT '' COMMENT '专业',
  `start` char(7) NOT NULL DEFAULT '' COMMENT '入学年月:2018-07',
  `end` char(7) NOT NULL DEFAULT '' COMMENT '结束年月， 日期或''至今''',
  `createtime` bigint(16) unsigned DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) unsigned DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) unsigned DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for __PREFIX__xilujob_resume_job_intention
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_resume_job_intention` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `resume_id` int(10) NOT NULL DEFAULT '0' COMMENT 'resume.id',
  `job_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '求职类型: 1=全职, 2=兼职',
  `fav_category_id` int(10) NOT NULL DEFAULT '0' COMMENT '期望职位: job_category.id ，到职位',
  `expect_salary_id` int(10) NOT NULL DEFAULT '0' COMMENT '期望薪资',
  `previous_job_category_id` int(10) NOT NULL DEFAULT '0' COMMENT '曾经做过: job_category.id',
  `industry_category_id` int(10) NOT NULL DEFAULT '0' COMMENT '期望行业',
  `fav_province_id` int(10) NOT NULL DEFAULT '0' COMMENT '省份id',
  `fav_city_id` int(10) NOT NULL DEFAULT '0' COMMENT '城市 area.id',
  `fav_area_id` int(10) NOT NULL DEFAULT '0' COMMENT 'area.id 偏好地区',
  `fav_town_id` int(10) NOT NULL DEFAULT '0',
  `createtime` bigint(16) unsigned DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) unsigned DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) unsigned DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for __PREFIX__xilujob_resume_personal_info
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_resume_personal_info` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL,
  `resume_id` int(10) NOT NULL DEFAULT '0' COMMENT '简历id',
  `avatar` varchar(255) DEFAULT NULL COMMENT '头像',
  `realname` varchar(20) NOT NULL DEFAULT '' COMMENT '姓名',
  `gender` tinyint(4) NOT NULL DEFAULT '0' COMMENT '性别:0=未选,1=男,2=女',
  `birthdate` varchar(10) NOT NULL DEFAULT '' COMMENT '出生日期',
  `education_level_id` int(10) NOT NULL DEFAULT '0' COMMENT '学历',
  `work_experience_id` int(10) NOT NULL DEFAULT '0' COMMENT 'work_experience_option.id（工作年限）',
  `current_state_id` int(10) NOT NULL DEFAULT '0' COMMENT '求职状态',
  `idcard_no` varchar(20) NOT NULL DEFAULT '' COMMENT '身份证号',
  `email` varchar(50) NOT NULL DEFAULT '' COMMENT '电子邮箱',
  `mobile` varchar(255) NOT NULL DEFAULT '' COMMENT '手机号码',
  `hukou_city` varchar(50) NOT NULL DEFAULT '' COMMENT '户口所在地',
  `hide_mobile` tinyint(4) NOT NULL DEFAULT '0' COMMENT '隐藏手机号',
  `marital` tinyint(4) NOT NULL DEFAULT '0' COMMENT '婚姻:0=未知,1=已婚,2=未婚',
  `createtime` bigint(16) unsigned DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) unsigned DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) unsigned DEFAULT NULL COMMENT '刪除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='简历个人信息';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_resume_personal_tag
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_resume_personal_tag` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '用户自定义标签记录第一个创建的用户id',
  `name` varchar(20) NOT NULL DEFAULT '' COMMENT '名称',
  `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '排序',
  `createtime` bigint(16) unsigned DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `name` (`name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='简历个人标签待选项';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_resume_personal_tag_relation
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_resume_personal_tag_relation` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `resume_id` int(10) NOT NULL DEFAULT '0' COMMENT '简历id',
  `tag_id` int(10) NOT NULL DEFAULT '0' COMMENT '标签id',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `resume_id` (`resume_id`,`tag_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for __PREFIX__xilujob_resume_schame_relation
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_resume_schame_relation` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `resume_id` int(10) NOT NULL DEFAULT '0' COMMENT '简历id',
  `schema_id` int(10) NOT NULL DEFAULT '0' COMMENT '简历模板id',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `company_benefit` (`resume_id`,`schema_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='简历与简历模板关系表';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_resume_schema
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_resume_schema` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `schema_name` varchar(50) DEFAULT NULL COMMENT '数据模板名称',
  `modules` varchar(80) NOT NULL DEFAULT '' COMMENT '所含模块定义',
  `status` tinyint(3) NOT NULL DEFAULT '1' COMMENT '状态:0=禁用,1=启用',
  `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '排序',
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='简历数据模板';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_resume_search_keyword
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_resume_search_keyword` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `keyword` varchar(100) NOT NULL DEFAULT '' COMMENT '搜索词',
  `search_count` int(11) NOT NULL DEFAULT '0' COMMENT '搜索次数',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `keyword` (`keyword`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for __PREFIX__xilujob_resume_skill
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_resume_skill` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `resume_id` int(10) NOT NULL DEFAULT '0' COMMENT '简历id',
  `skill_name` varchar(20) NOT NULL DEFAULT '' COMMENT '技能名称',
  `level_id` int(10) NOT NULL DEFAULT '0' COMMENT '掌握程度: 入门,熟练,精通',
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='个人技能';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_resume_summary
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_resume_summary` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `resume_id` int(10) NOT NULL DEFAULT '0' COMMENT '简历id',
  `content` varchar(300) NOT NULL DEFAULT '',
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='个人总结';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_resume_view_log
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_resume_view_log` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `company_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
  `resume_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '简历模板',
  `view_count` int(10) unsigned NOT NULL DEFAULT '1' COMMENT '看的总次数',
  `view_time` bigint(16) unsigned DEFAULT NULL COMMENT '上一次看的时间',
  `createtime` bigint(16) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='公司查看简历日志';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_resume_work
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_resume_work` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `resume_id` int(10) NOT NULL DEFAULT '0' COMMENT '简历id',
  `company_name` varchar(50) NOT NULL DEFAULT '' COMMENT '公司名称',
  `job_title` varchar(20) NOT NULL DEFAULT '' COMMENT '职位',
  `start` char(7) NOT NULL DEFAULT '' COMMENT '2018-09',
  `end` char(7) NOT NULL DEFAULT '' COMMENT '2019-09，或 至今',
  `detail` varchar(500) NOT NULL DEFAULT '' COMMENT '工作描述',
  `createtime` bigint(16) unsigned DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) unsigned DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) unsigned DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for __PREFIX__xilujob_salary
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_salary` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `option_type` tinyint(4) NOT NULL COMMENT '类型:1=时薪,2=日薪,3=月薪',
  `name` varchar(20) NOT NULL DEFAULT '' COMMENT '名称',
  `min` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '下限',
  `max` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '上限',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='薪资选项';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_search_keyword
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_search_keyword` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `keyword` varchar(20) CHARACTER SET utf8 NOT NULL,
  `search_count` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `keyword` (`keyword`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for __PREFIX__xilujob_single_page
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_single_page` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `title` varchar(50) NOT NULL DEFAULT '' COMMENT '标题',
  `content` mediumtext NOT NULL COMMENT '内容',
  `short_tag` char(20) DEFAULT NULL,
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='单页文章';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_site_city
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_site_city` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `city_id` int(10) NOT NULL DEFAULT '0' COMMENT '城市',
  `city_name` varchar(20) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '城市名称',
  `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:0=禁用,1=正常',
  `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '排序',
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `city_id` (`city_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='开放城市';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_skill_level
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_skill_level` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(10) NOT NULL DEFAULT '' COMMENT '名称',
  `weigh` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='技能熟练度';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_system_message
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_system_message` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) NOT NULL DEFAULT '' COMMENT '标题',
  `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '类型:1=系统消息, 2=活动消息',
  `content` varchar(255) NOT NULL COMMENT '内容',
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统消息';


-- ----------------------------
-- Table structure for __PREFIX__xilujob_third
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_third` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID',
  `platform` varchar(30) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '第三方应用',
  `openid` varchar(100) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '第三方唯一ID',
  `openname` varchar(100) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '第三方会员昵称',
  `avatar` varchar(255) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '头像',
  `access_token` varchar(255) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'AccessToken',
  `refresh_token` varchar(255) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'RefreshToken',
  `unionid` varchar(50) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'UnionId',
  `expires_in` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '有效期',
  `auth_userinfo` enum('0','1') COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '授权用户信息',
  `createtime` bigint(16) unsigned DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) unsigned DEFAULT NULL COMMENT '更新时间',
  `logintime` bigint(16) unsigned DEFAULT NULL COMMENT '登录时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `user_id` (`user_id`,`platform`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='第三方登录表';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_user
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_user` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '当前组别ID: 1=用户, 2=企业',
  `enterprise_group_id` int(10) NOT NULL DEFAULT '0' COMMENT '已注册的企业账号group_id, 仅能为2或3',
  `trainer_group_id` int(10) NOT NULL DEFAULT '0' COMMENT '培训机构group_id， 为0则未创建培训机构账号， 为1有, enterprise_info信息与公司共用',
  `contact_phone` varchar(20) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '联系人手机',
  `contact_email` varchar(50) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '联系人邮箱',
  `city_id` int(10) NOT NULL DEFAULT '0' COMMENT 'area.id 当前城市id,影响发布的内容',
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) unsigned DEFAULT NULL COMMENT '删除时间',
  `actiontime` bigint(16) DEFAULT NULL,
  `source` tinyint(3) NOT NULL DEFAULT '0' COMMENT '来源:0=注册,1=后台添加',
  `personal_message` mediumint(5) unsigned NOT NULL DEFAULT '0' COMMENT '个人消息',
  `activity_message` mediumint(5) unsigned NOT NULL DEFAULT '0' COMMENT '活动消息',
  `system_message` mediumint(5) unsigned NOT NULL DEFAULT '0' COMMENT '系统消息',
  `discover_message` mediumint(5) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `deletetime` (`deletetime`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='会员表';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_user_active_log
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_user_active_log` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT 'user.id',
  `type` tinyint(4) NOT NULL DEFAULT '-1' COMMENT '1=个人， 2=企业和劳务店铺',
  `active_time` bigint(16) unsigned NOT NULL COMMENT '活跃记录时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `user_id` (`user_id`,`active_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for __PREFIX__xilujob_user_blacklist_company
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_user_blacklist_company` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `company_id` int(10) NOT NULL DEFAULT '0' COMMENT '企业id',
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `user_id` (`user_id`,`company_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户黑名单';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_user_collection
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_user_collection` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '记录ID',
  `user_id` int(10) unsigned DEFAULT '0' COMMENT '用户id',
  `collection_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '类型:1=课程,2=职位,3=公司,4=简历',
  `collection_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'id',
  `createtime` bigint(16) unsigned DEFAULT NULL COMMENT '收藏时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `user_id_2` (`user_id`,`collection_type`,`collection_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户收藏表';


-- ----------------------------
-- Table structure for __PREFIX__xilujob_user_feedback
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_user_feedback` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `content` varchar(255) NOT NULL DEFAULT '' COMMENT '反馈内容',
  `images` mediumtext COMMENT '图片',
  `contact` varchar(50) NOT NULL DEFAULT '' COMMENT '联系方式',
  `reason` varchar(30) NOT NULL DEFAULT '' COMMENT '理由',
  `status` tinyint(3) NOT NULL DEFAULT '0' COMMENT '状态:0=未处理,1=已采纳,2=不予采纳',
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='反馈表';


-- ----------------------------
-- Table structure for __PREFIX__xilujob_user_recommend_job
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_user_recommend_job` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `job_id` int(10) NOT NULL DEFAULT '0' COMMENT '职位id',
  `company_id` int(10) NOT NULL DEFAULT '0' COMMENT '公司id',
  `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '排序',
  `createtime` bigint(16) DEFAULT NULL COMMENT '添加时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `company_id` (`user_id`,`job_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='为个人用户人工推荐职位';


-- ----------------------------
-- Table structure for __PREFIX__xilujob_work_experience
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_work_experience` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) NOT NULL DEFAULT '' COMMENT '名称',
  `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '排序',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='工作年限';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_work_state
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_work_state` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(30) NOT NULL DEFAULT '' COMMENT '名称',
  `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '排序',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='求职状态';


-- ----------------------------
-- Table structure for __PREFIX__xilujob_package
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_package` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '套餐名称',
  `thumb` varchar(255) NOT NULL DEFAULT '' COMMENT '缩略图',
  `salesprice` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '价格',
  `expires` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '有效期',
  `unit` tinyint(2) unsigned NOT NULL DEFAULT '1' COMMENT '单位:1=天,2=月,3=年',
  `job_publish_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '发布职位数',
  `resume_view_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '简历查看数',
  `interview_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '面试邀请数',
  `job_refresh_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '职位刷新数',
  `status` tinyint(2) unsigned NOT NULL DEFAULT '1' COMMENT '状态:0=隐藏,1=正常',
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='招聘套餐';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_package_order
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_package_order` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `platform` varchar(20) NOT NULL DEFAULT '' COMMENT '订单平台',
  `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
  `company_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '公司id',
  `order_no` varchar(50) NOT NULL DEFAULT '' COMMENT '订单号',
  `order_trade_no` varchar(50) NOT NULL DEFAULT '' COMMENT '交易单号',
  `total_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '总价格',
  `pay_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '支付价格',
  `pay_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '支付类型:支付方式:1=微信,2=支付宝,3=线下对公',
  `pay_status` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '支付状态:0=已取消,1=待支付,2=已支付',
  `paytime` bigint(16) unsigned DEFAULT NULL COMMENT '支付时间',
  `wxconfig` varchar(1000) NOT NULL DEFAULT '' COMMENT '微信支付配置',
  `trade_no` varchar(50) NOT NULL DEFAULT '' COMMENT '三方交易号',
  `ticket_type` tinyint(2) unsigned NOT NULL DEFAULT '1' COMMENT '开票类型:1=普票,2=专票',
  `ticket` varchar(500) NOT NULL DEFAULT '' COMMENT '开票信息',
  `corporate_company` varchar(50) NOT NULL DEFAULT '' COMMENT '公司名',
  `open_bank` varchar(50) NOT NULL DEFAULT '' COMMENT '开户行',
  `corporate_account` varchar(50) NOT NULL DEFAULT '' COMMENT '开户账号',
  `package_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会员卡id',
  `package_name` varchar(255) NOT NULL DEFAULT '' COMMENT '名称',
  `package_salesprice` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '价格',
  `package_expires` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '时间',
  `package_unit` tinyint(2) unsigned NOT NULL DEFAULT '1' COMMENT '单位:1=天,2=月,3=年',
  `job_publish_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '发布职位数',
  `resume_view_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '简历查看数',
  `interview_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '面试邀请数',
  `job_refresh_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '职位刷新数',
  `ip` varchar(50) NOT NULL DEFAULT '' COMMENT '买家ip',
  `remarks` varchar(255) DEFAULT NULL COMMENT '备注',
  `code_url` varchar(255) DEFAULT '' COMMENT '二维码地址',
  `code_url_expire_in` bigint(16) DEFAULT NULL COMMENT '有效期时间',
  `openid` varchar(100) DEFAULT NULL COMMENT 'openid',
  `canceltime` bigint(16) DEFAULT NULL COMMENT '取消时间',
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='套餐订单';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_config
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_config` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(30) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '变量名',
  `group` varchar(30) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '分组',
  `title` varchar(100) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '变量标题',
  `tip` varchar(100) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '变量描述',
  `type` varchar(30) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '类型:string,text,int,bool,array,datetime,date,file',
  `value` text COLLATE utf8mb4_general_ci COMMENT '变量值',
  `content` text COLLATE utf8mb4_general_ci COMMENT '变量字典数据',
  `rule` varchar(100) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '验证规则',
  `extend` varchar(255) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '扩展属性',
  `setting` varchar(255) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '配置',
  `visible` varchar(255) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '可见条件',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `name` (`name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统配置';

-- ----------------------------
-- Records of __PREFIX__xilujob_config
-- ----------------------------
BEGIN;
INSERT INTO `__PREFIX__xilujob_config` VALUES (1, 'corporate_company', 'basic', '对公账户名', '', 'string', '', '', '', '', NULL, '');
INSERT INTO `__PREFIX__xilujob_config` VALUES (2, 'open_bank', 'basic', '开户行', '', 'string', '', '', '', '', NULL, '');
INSERT INTO `__PREFIX__xilujob_config` VALUES (3, 'corporate_account', 'basic', '开户账号', '', 'string', '', '', '', '', NULL, '');
INSERT INTO `__PREFIX__xilujob_config` VALUES (4, 'resume_action_num', 'basic', '简历查看免费数', '', 'number', '10', '', '', '', '{\"table\":\"\",\"conditions\":\"\",\"key\":\"\",\"value\":\"\"}', '');
INSERT INTO `__PREFIX__xilujob_config` VALUES (5, 'job_publish_num', 'basic', '职位免费发布数', '', 'number', '10', '', '', '', '{\"table\":\"\",\"conditions\":\"\",\"key\":\"\",\"value\":\"\"}', '');
INSERT INTO `__PREFIX__xilujob_config` VALUES (6, 'interview_num', 'basic', '面试免费邀请数', '', 'number', '10', '', '', '', '{\"table\":\"\",\"conditions\":\"\",\"key\":\"\",\"value\":\"\"}', '');
INSERT INTO `__PREFIX__xilujob_config` VALUES (7, 'job_refresh_num', 'basic', '职位免费刷新数', '', 'string', '10', '', '', '', '{\"table\":\"\",\"conditions\":\"\",\"key\":\"\",\"value\":\"\"}', '');
INSERT INTO `__PREFIX__xilujob_config` VALUES (13, 'is_ssl', 'websocket', 'SSL开关', '', 'switch', '1', '', '', '', '{\"table\":\"\",\"conditions\":\"\",\"key\":\"\",\"value\":\"\"}', '');
INSERT INTO `__PREFIX__xilujob_config` VALUES (14, 'websocket_port', 'websocket', 'websocket端口号', '', 'string', '8282', '', '', '', '{\"table\":\"\",\"conditions\":\"\",\"key\":\"\",\"value\":\"\"}', '');
INSERT INTO `__PREFIX__xilujob_config` VALUES (15, 'start_port', 'websocket', '内部通讯起始端口', '', 'string', '4000', '', '', '', '{\"table\":\"\",\"conditions\":\"\",\"key\":\"\",\"value\":\"\"}', '');
INSERT INTO `__PREFIX__xilujob_config` VALUES (16, 'register_address_port', 'websocket', '服务注册端口号', '', 'string', '1255', '', '', '', '{\"table\":\"\",\"conditions\":\"\",\"key\":\"\",\"value\":\"\"}', '');
INSERT INTO `__PREFIX__xilujob_config` VALUES (17, 'local_cert', 'websocket', '证书cert', '', 'string', '/www/server/panel/vhost/ssl/www.example.com/fullchain.pem', '', '', '', '{\"table\":\"\",\"conditions\":\"\",\"key\":\"\",\"value\":\"\"}', '');
INSERT INTO `__PREFIX__xilujob_config` VALUES (18, 'local_pk', 'websocket', '证书pk', '', 'string', '/www/server/panel/vhost/ssl/www.example.com/privkey.pem', '', '', '', '{\"table\":\"\",\"conditions\":\"\",\"key\":\"\",\"value\":\"\"}', '');
COMMIT;

-- ----------------------------
-- Table structure for __PREFIX__xilujob_job_refresh_log
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_job_refresh_log` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
  `company_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '企业id',
  `job_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '职位id',
  `createtime` bigint(16) unsigned DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `job_id` (`job_id`) USING BTREE,
  KEY `user_id` (`user_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='企业职位刷新日志';

-- ----------------------------
-- Table structure for __PREFIX__xilujob_job_log
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_job_log` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
  `company_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '企业id',
  `job_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '职位id',
  `job_name` varchar(255) NOT NULL DEFAULT '' COMMENT '职位名称',
  `createtime` bigint(16) unsigned DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `job_id` (`job_id`) USING BTREE,
  KEY `user_id` (`user_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='企业职位发布日志';


--
-- 1.0.4添加名称字段
--
ALTER TABLE `__PREFIX__xilujob_enterprise_info` ADD COLUMN `interview_num` int(10) NOT NULL DEFAULT 0 COMMENT '面试邀请数' AFTER `job_num_limit`;
ALTER TABLE `__PREFIX__xilujob_enterprise_info` ADD COLUMN `job_refresh_num` int(10) NOT NULL DEFAULT 0 COMMENT '职位刷新数' AFTER `interview_num`;
ALTER TABLE `__PREFIX__xilujob_job` ADD COLUMN `refresh_count` int(10) NOT NULL DEFAULT 0 COMMENT '职位刷新数' AFTER `apply_count`;

--
-- 1.0.6新增
--
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_company_address` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
  `company_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '公司id',
  `province_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '省id',
  `city_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '市id',
  `district_id` int(10) unsigned NOT NULL DEFAULT '0',
  `address_name` varchar(50) NOT NULL DEFAULT '' COMMENT '短地址',
  `address` varchar(255) NOT NULL DEFAULT '' COMMENT '详细地址',
  `house_number` varchar(20) NOT NULL DEFAULT '' COMMENT '门牌号',
  `lat` float(10,7) unsigned NOT NULL DEFAULT '0.0000000' COMMENT '纬度',
  `lng` float(10,7) unsigned NOT NULL DEFAULT '0.0000000' COMMENT '经度',
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='公司地址记录';

ALTER TABLE `__PREFIX__xilujob_job_location` ADD COLUMN `address_name` varchar(80) NOT NULL DEFAULT '' COMMENT '地址名称' AFTER `district_id`;
ALTER TABLE `__PREFIX__xilujob_job_location` ADD COLUMN `house_number` varchar(30) NOT NULL DEFAULT '' COMMENT '门牌号' AFTER `address`;
ALTER TABLE `__PREFIX__xilujob_job_location` ADD COLUMN `company_address_id` int(10) NOT NULL DEFAULT 0 COMMENT '公司地址id' AFTER `id`;
ALTER TABLE `__PREFIX__xilujob_enterprise_info` ALTER COLUMN `job_num_limit` SET DEFAULT 0;


--
--1.0.9更新
--
-- ----------------------------
-- Table structure for __PREFIX__xilujob_chat_session
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_chat_session` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`send_group_id` tinyint(2) unsigned NOT NULL DEFAULT '1' COMMENT '发送组:1=个人,2=企业',
`send_user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '发送用户',
`receive_group_id` tinyint(2) unsigned NOT NULL DEFAULT '1' COMMENT '发送组:1=个人,2=企业',
`receive_user_id` int(10) unsigned DEFAULT '0' COMMENT '接收用户',
`see_type` tinyint(1) unsigned DEFAULT '0' COMMENT '可见状态:0=正常,1=发送人被拉黑(接收人不可见),2=接收人被拉黑(发送人不可见),3=相互拉黑(两方都不可见)',
`createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
`updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
`deletetime` bigint(16) DEFAULT NULL COMMENT '删除时间',
`senddeletetime` bigint(16) DEFAULT NULL COMMENT '发送人删除时间',
`receivedeletetime` bigint(16) DEFAULT NULL COMMENT '接收人删除时间',
PRIMARY KEY(`id`) USING BTREE,
KEY `receive_user_id` (`receive_user_id`) USING BTREE,
KEY `send_user_id` (`send_user_id`) USING BTREE ) ENGINE=InnoDB DEFAULT
CHARSET=utf8mb4 COMMENT='聊天会话列表';



ALTER TABLE `__PREFIX__xilujob_chat` ADD COLUMN `session_id` int(10) NOT NULL DEFAULT 0 COMMENT '会话ID' AFTER `id`;
ALTER TABLE `__PREFIX__xilujob_chat` ADD COLUMN `from_group_id` tinyint(2) NOT NULL DEFAULT 0 COMMENT '发送者组别' AFTER `from_uid`;
ALTER TABLE `__PREFIX__xilujob_chat` ADD COLUMN `to_group_id` tinyint(2) NOT NULL DEFAULT 0 COMMENT '接收者组别' AFTER `to_uid`;


--
--1.1.0更新
--
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_resume_file` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '用户id;user.id',
  `member_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '求职ID',
  `resume_id` int(10) DEFAULT '0' COMMENT '简历id',
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '文件名称',
  `file` varchar(255) NOT NULL DEFAULT '' COMMENT '简历附件',
  `file_ext` varchar(10) NOT NULL DEFAULT '' COMMENT '文件后缀',
  `createtime` bigint(16) unsigned DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) unsigned DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='简历附件';

--
--1.2.0更新
--

CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_chat_emoji` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL COMMENT '表情描述',
  `image` varchar(255) DEFAULT NULL COMMENT '表情图片',
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) DEFAULT NULL COMMENT '删除时间',
  `weigh` int(10) DEFAULT '0' COMMENT '权重',
  `status` enum('normal','hidden') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'normal' COMMENT '状态:normal=上架,hidden=下架',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='聊天表情包';

-- chat_session
ALTER TABLE `__PREFIX__xilujob_chat_session` ADD COLUMN `company_id` int(10) NOT NULL DEFAULT 0 COMMENT '公司' AFTER `see_type`;
ALTER TABLE `__PREFIX__xilujob_chat_session` ADD COLUMN `resume_id` int(10) NOT NULL DEFAULT 0 COMMENT '简历' AFTER `company_id`;

-- chat
ALTER TABLE `__PREFIX__xilujob_chat` ADD COLUMN `apply_id` int(10) NOT NULL DEFAULT 0 COMMENT '简历' AFTER `job_id`;
ALTER TABLE `__PREFIX__xilujob_chat` ADD COLUMN `interview_id` int(10) NOT NULL DEFAULT 0 COMMENT '面试' AFTER `apply_id`;
ALTER TABLE `__PREFIX__xilujob_chat` ADD COLUMN `see_type` int(10) NOT NULL DEFAULT 0 COMMENT '面试' AFTER `isread`;

-- resume
ALTER TABLE `__PREFIX__xilujob_resume` ADD COLUMN `member_id` int(10) NOT NULL DEFAULT 0 COMMENT '面试' AFTER `id`;
ALTER  TABLE  `__PREFIX__xilujob_resume`  add  UNIQUE(`member_id`);


--
--1.3.0更新
--
CREATE TABLE IF NOT EXISTS `__PREFIX__xilujob_navigation` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '名称',
  `group` varchar(50) NOT NULL DEFAULT '' COMMENT '角色:1=求职,2=企业',
  `icon_image` varchar(255) NOT NULL DEFAULT '' COMMENT '图标',
  `type` tinyint(2) unsigned NOT NULL DEFAULT '1' COMMENT '类型:1=内链,2=外链,3=其他小程序',
  `mini_appid` varchar(50) NOT NULL DEFAULT '' COMMENT '第三方APPID',
  `jump_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '跳转:1=navigate,2=switchtab',
  `url` varchar(255) NOT NULL DEFAULT '' COMMENT '链接',
  `status` tinyint(2) unsigned NOT NULL DEFAULT '1' COMMENT '状态:0=隐藏,1=正常',
  `weigh` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  `createtime` bigint(16) unsigned DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='金刚区';

-- ----------------------------
-- Records of __PREFIX__xilujob_navigation
-- ----------------------------
INSERT INTO `__PREFIX__xilujob_navigation` VALUES (2, '全部职位', '1', '/assets/addons/xilujob/images/navigation/deb53e8d9dbcc1e71082c3dc69e2202a.png', 1, '', 2, '/pages/public/find_job', 1, 2, 1701063323, 1744955007);
INSERT INTO `__PREFIX__xilujob_navigation` VALUES (6, '急招岗位', '1', '/assets/addons/xilujob/images/navigation/d33b45785397dcced53a567dc9dcac41.jpg', 1, '', 2, '/pages/public/find_job?seek_job_type=hurry', 1, 6, 1732515170, 1744955049);
INSERT INTO `__PREFIX__xilujob_navigation` VALUES (7, '兼职岗位', '1', '/assets/addons/xilujob/images/navigation/08ba7fa40ce9469880aa588bd4769709.png', 1, '', 2, '/pages/public/find_job?seek_job_type=parttime', 1, 7, 1744869696, 1744955067);
INSERT INTO `__PREFIX__xilujob_navigation` VALUES (8, '红包招聘', '1', '/assets/addons/xilujob/images/navigation/2282f19709cdc410711a0677bdb69952.png', 1, '', 2, '/pages/public/find_job?seek_job_type=redpacket', 1, 8, 1744869827, 1745898598);
INSERT INTO `__PREFIX__xilujob_navigation` VALUES (9, '找人才', '2', '/assets/addons/xilujob/images/navigation/073bb15a579d10270b572afb5c4d7176.png', 1, '', 2, '/pages/public/find_talent', 1, 9, 1744869919, 1744955117);
INSERT INTO `__PREFIX__xilujob_navigation` VALUES (10, '发布全职', '2', '/assets/addons/xilujob/images/navigation/04fd16dee64cbafbcc1baa0b7dea8483.png', 1, '', 1, '/pages/company/publish_full', 1, 10, 1744869986, 1744955294);

--
--1.3.1
--
ALTER TABLE `__PREFIX__xilujob_company_profile` ADD COLUMN `refuse_reason` varchar (255) NOT NULL DEFAULT '' COMMENT '拒绝理由' AFTER `audit_status`;